﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>XmlContent</title>
</head>
<body>
    <!-- Modal -->
    <div class="modal-body">
        <div class="row">
            <textarea id="txtXmlContent" readonly style="width:540px;min-height:280px;"/>
        </div>
    </div>
    <div class="modal-footer">
        <button id="btnCopy" class="btn lang" as="copytoclipboard" data-clipboard-action="copy" data-clipboard-target="#txtXmlContent"></button>
        <button class="btn btn-primary lang" as="close" data-dismiss="modal" aria-hidden="true"></button>
    </div>
    <script type="text/javascript" src="~/Scripts/clipboard.min.js"></script>
    <script type="text/javascript">
        $(function () {
            kresource.localize();
            processlist.showXmlContent();

            //copy xml to clipboard
            copyToClipboard();
        })

        function copyToClipboard() {
            var clipboard = new ClipboardJS('#btnCopy');
            clipboard.on('success', function () {
　　             $.msgBox({
                    title: "Process / XML",
                    content: kresource.getItem('xmlcopytoclipboardok'),
				    type: "info"
			    });
            });
            clipboard.on('error', function () {
　　            $.msgBox({
                    title: "Process / XML",
                    content: kresource.getItem('xmlcopytoclipboardwarn'),
				    type: "alert"
			    });
            });
        }
    </script>
</body>
</html>
